package com.njtoyo.taxi.admin.mapper.master.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.master.entity.GeoCustomerRegion;
import com.njtoyo.taxi.admin.rest.presenter.business.geo.AllListPresenter;
import com.njtoyo.taxi.admin.rest.presenter.business.geo.RegionListPresenter;
import com.njtoyo.taxi.admin.rest.wrapper.business.canton.RegionQueryWrapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 乘客运营区 Mapper 接口
 * </p>
 *
 * @author Dell
 * @since 2021-10-12
 */
@Repository
@DS(Const.PRIMARY_DS)
public interface GeoCustomerRegionMapper extends BaseMapper<GeoCustomerRegion> {
    Page<RegionListPresenter> getListByPage(RegionQueryWrapper wrapper);

    List<AllListPresenter> getListByCantonIds(@Param("cantonIds") List<Long> cantonIds);

    List<Long> getRegionIdsByAreaIds(@Param("areaIds") List<Long> areaIds);
}